package cn.gok.gokhappymall.manage.web;

import cn.gok.gokhappymall.manage.service.IProductService;
import cn.gok.gokhappymall.util.ResultData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: chenfan
 * @Description:
 */
@RestController
@RequestMapping("/manage/product")
public class ProductController {
    @Autowired
    IProductService productService;

    @RequestMapping("/list.do")
    public ResultData getAllProducts(@RequestParam(defaultValue = "1")int pageNum,
                                     @RequestParam(defaultValue = "10") int pageSize){

        return productService.getAllProducts(pageNum,pageSize);

    }


}
